package com.yjd.job;

import org.springframework.scheduling.quartz.CronTriggerBean;

import com.yjd.comm.annotation.ServiceRemoteProxy;
import com.yjd.comm.rpm.RpmServiceKeyEnum;
import com.yjd.job.service.IJobService;

/**
 * <b>description</b>：job触发 <br>
 * <b>time</b>：2014-8-22 下午7:14:54 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public class CronTriggerBeanWrap extends CronTriggerBean {

	public void setJob(BaseJob job) throws Exception {
		this.setCronExpression(this.jobService.getJobModelByType(
				job.getJobType()).getCron());

	}

	private static final long serialVersionUID = 1L;
	@ServiceRemoteProxy(serviceUrlResouceKey = RpmServiceKeyEnum.RPM_JOB_SERVICE_KEY)
	private IJobService jobService;

}
